Repository navigation
feat: press-only clicks, hover lift and tag releases for 0.3.0 - #77
Merged
Merged
Conversation
Graphik gains beginFrame()/endFrame(): after the first beginFrame, a button fires once per press, in the frame mouse button 1 goes down over it. Instances that never call beginFrame keep firing while held, as before. Each press fires at most once, a press already held when frames start does not count, and a frame that misses endFrame does not leave clicks stuck. drawButton lifts the box colour while the mouse is over it. Both features were carried by a consumer's local copy and are now upstream. graphik is released as git tags installed from the tag archive, not PyPI: publish.yml becomes manual-only, RELEASING.md describes tag releases, and a new CI job installs a GitHub-style archive and draws with it. The licence moves to the SPDX form (setuptools>=77), silencing the deprecation warning on every install. README gains rendered images, the new methods and a Dependents table. Version 0.3.0. Tests: 157 -> 181. drafted by Claude on behalf of Daniel Stephenson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeuoCqxFpUXrFhxnTg89
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graphik 0.3.0: optional press-only button clicks, a hover lift on buttons, and a release process based on git tags so the games that use graphik can install it instead of carrying their own copies.
Why
Six games vendor their own copies of graphik, which have drifted apart; improvements made in one (Roam's press-only clicks and hover) never reached the others, and upstream changes reach none of them. A tagged release that every game installs fixes that.
What changed
beginFrame()/endFrame(): after the firstbeginFrame(),drawButtonfires once per press instead of every call while held. Without it, behaviour is unchanged. Each press fires at most one callback (no click-through into nested screens or later draws); a press already held when frames start doesn't count; a frame that missesendFrame()doesn't leave clicks stuck.graphik @ https://github.com/Stephenson-Software/graphik/archive/refs/tags/v0.3.0.zip(nogitneeded).publish.ymlis manual-only; RELEASING.md rewritten; issue release: version tags are pushed without the 'v' prefix publish.yml requires, so no release has ever been published #34's tag-prefix problem no longer blocks releases.setuptools>=77); no more deprecation warning on install.scripts/make_readme_images.py, new methods documented, Dependents table.How it was tested
pytest: 181 passed (157 before; six existing tests updated only for the hover colour; new tests for both click modes, missedendFrame, nested loops, int colours).Player-visible changes
Buttons show hover feedback. A click on a button's top or left edge pixel now counts (the hit test already matched the drawn box upstream).
After merging
Tag
v0.3.0on the merge commit and create the GitHub release; the dependent games' PRs pin that tag.drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code